/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.employee.service;

import java.util.Date;
import java.util.List;

import com.alibaba.druid.mock.MockDriver;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.employee.entity.EmployeeLeave;
import com.thinkgem.jeesite.modules.employee.dao.EmployeeLeaveDao;

/**
 * 员工假期Service
 * @author hui.li
 * @version 2017-07-18
 */
@Service
@Transactional(readOnly = true)
public class EmployeeLeaveService extends CrudService<EmployeeLeaveDao, EmployeeLeave> {

	public EmployeeLeave get(String id) {
		return super.get(id);
	}
	
	public List<EmployeeLeave> findList(EmployeeLeave employeeLeave) {
		return super.findList(employeeLeave);
	}
	
	public Page<EmployeeLeave> findPage(Page<EmployeeLeave> page, EmployeeLeave employeeLeave) {
		return super.findPage(page, employeeLeave);
	}
	
	@Transactional(readOnly = false)
	public void save(EmployeeLeave employeeLeave) {
		super.save(employeeLeave);
	}
	
	@Transactional(readOnly = false)
	public void delete(EmployeeLeave employeeLeave) {
		super.delete(employeeLeave);
	}

	public double queryEmployeeLeaveByUserAndDays(String number, Date monday, Date date, String typeCode) {

		return dao.queryEmployeeLeaveByUserAndDays(number, monday,date,typeCode);
	}
}